package pikes.peak;

import java.util.HashMap;

import org.junit.Test;

import pikes.html.xhtml.Flow;
import pikes.html.xhtml.Script;
import pikes.peak.test.AssertHtml;
import pikes.peak.test.PikesPeakComponentTestCase;
import pikes.uri.RelativeURI;

public class ExternalScriptTestCase extends PikesPeakComponentTestCase {

	@Test
	public void externalScript() throws Exception {
		ScriptReference script = new ScriptReference(new RelativeURI("jssource.js"));

		Script expected = new Script("text/javascript", new RelativeURI("jssource.js"));

		Flow actual = script.createHtml(new HashMap(), pikesPeakRequest.getRequestContext());
		AssertHtml.assertEquals(expected, actual);
	}
}
